public class code3 {
    public static int getSum(int n){
        if(n==1)
            return 1;
        else
            return n+getSum(n-1);
    }
    public static void main(String[] args) {
        for(int i=1;i<=10;i++){
            System.out.print(getSum(i)+" ");
        }
    }
}
